[−][src]Crate cqrs_es
cqrs
A lightweight, opinionated CQRS and event sourcing framework targeting serverless architectures.
Installation
cqrs-es is available from Crates.io or Github.
[dependencies]
cqrs-es = "0.0.13"
Opinions
- Aggregate persistence is via event sourcing only.
- Metadata is implemented only as a
HashMap<String,String>
. Further, theMetadataSupplier
that the user provides has no insight into the event or aggregate that it supplies metadata for. This may be changed. - JSON serialization only.
- Generics are preferred over boxed traits.
- Persistence is implemented through a Postgres database.
Todos/research
- Event upcasters.
- Explore options for increasing the usefulness of
MetadataSupplier
. - Event serialization uses the event type as the root node of the JSON tree. This simplifies deserialization but is non-standard.
- Persistence implementation for DynamoDb.
Modules
mem_store | An in-memory event store suitable for local testing. |
test | Test provides a test framework for building a resilient test base around aggregates. |
Structs
CqrsFramework | This is the base framework for applying commands to produce events. |
MessageEnvelope |
|
UserErrorPayload | Payload for an |
Enums
AggregateError | The base error for the framework. |
Traits
Aggregate | A trait that defines an |
Command | A |
DomainEvent | A |
EventStore | The abstract central source for loading past events and committing new events. |
Query | Downstream |
QueryProcessor | Each CQRS platform should have one or more |